home *** CD-ROM | disk | FTP | other *** search
- global gCurrentLabel, gGizmo, gIdleAllowed, gExtFolderPath, gIsMac, gVoicePlaying, gLegendSprite, g3DIntroShown, gZoomObj
-
- on startMovie
- if objectp(gGizmo) then
- disposeGizmo(gGizmo)
- set gGizmo to 0
- end if
- set gIdleAllowed to 0
- set gVoicePlaying to 0
- set g3DIntroShown to 0
- set gLegendSprite to 38
- set gCurrentLabel to "CanadaMenu"
- set the floatPrecision to 3
- if the machineType = 256 then
- set gIsMac to 0
- set gExtFolderPath to the pathName & "EO_EXT\"
- else
- set gIsMac to 1
- set gExtFolderPath to the pathName & "EO_EXT:"
- end if
- end
-
- on stopMovie
- end
-
- on idle
- if gIdleAllowed then
- updateGizmo(gGizmo)
- end if
- end
-
- on returnMenu
- if gCurrentLabel <> "CanadaMenu" then
- sound stop 1
- sound stop 2
- puppetSound(0)
- puppetSprite(20, 0)
- turnLegend(#off)
- set gCurrentLabel to "CanadaMenu"
- set gVoicePlaying to 0
- setCompassPict(gGizmo, #off)
- unsetCursor(gGizmo)
- if not gizmoOpened(gGizmo) then
- expandGizmo(gGizmo, point(522, 121))
- end if
- if showToolDrawerState(gGizmo) then
- closeToolDrawer(gGizmo)
- end if
- go("CanadaMenu")
- set gIdleAllowed to 1
- end if
- end
-
- on handleSubMaps thisClickedLoc
- set thisRegion to 0
- if inside(thisClickedLoc, rect(131, 361, 152, 382)) then
- set thisRegion to "Van"
- else
- if inside(thisClickedLoc, rect(280, 364, 301, 385)) then
- set thisRegion to "RidingM"
- else
- if inside(thisClickedLoc, rect(302, 377, 323, 398)) then
- set thisRegion to "RedRiver"
- else
- if inside(thisClickedLoc, rect(303, 120, 324, 141)) then
- set thisRegion to "Corn"
- else
- if inside(thisClickedLoc, rect(330, 365, 351, 386)) then
- set thisRegion to "RedLake"
- else
- if inside(thisClickedLoc, rect(406, 427, 427, 448)) then
- set thisRegion to "LakeHur"
- else
- if inside(thisClickedLoc, rect(443, 399, 464, 420)) then
- set thisRegion to "CenOnt"
- else
- if inside(thisClickedLoc, rect(445, 421, 466, 442)) then
- set thisRegion to "Toronto"
- else
- if inside(thisClickedLoc, rect(483, 368, 504, 389)) then
- set thisRegion to "Montreal"
- else
- exit
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- set gCurrentLabel to thisRegion
- playSound(member "E_NARRATION" of castLib "shared")
- setLeftPanelBtn(gGizmo, 2, 1)
- set gIdleAllowed to 0
- if tellLeftBtnState(gGizmo, 3) = 1 then
- set gVoicePlaying to 1
- setCompassPict(gGizmo, #on, member (gCurrentLabel & "_stillP") of castLib "Internal")
- go(thisRegion)
- sound playFile 2, gExtFolderPath & gCurrentLabel
- if not showHelpState(gGizmo) then
- openHelpDrawer(gGizmo)
- end if
- else
- set gVoicePlaying to 0
- setCompassPict(gGizmo, #on, member (gCurrentLabel & "_LenTxt") of castLib "Internal")
- putAreaName()
- go(thisRegion)
- end if
- end
-
- on handle3Ds thisClickedLoc
- set thisRegion to 0
- if inside(thisClickedLoc, rect(18, 385, 68, 426)) then
- set thisRegion to "CanadaRelief"
- set thisName to "Canada Relief"
- else
- if inside(thisClickedLoc, rect(87, 349, 122, 379)) then
- set thisRegion to "VancouverIsland"
- set thisName to "Vancouver Island"
- else
- if inside(thisClickedLoc, rect(108, 175, 143, 205)) then
- set thisRegion to "Yukon"
- set thisName to "Yukon"
- else
- if inside(thisClickedLoc, rect(161, 361, 196, 391)) then
- set thisRegion to "Oakanagan"
- set thisName to "Oakanagan"
- else
- if inside(thisClickedLoc, rect(323, 73, 358, 103)) then
- set thisRegion to "PolarBearPass"
- set thisName to "Polar Bear Pass"
- else
- if inside(thisClickedLoc, rect(416, 317, 451, 347)) then
- set thisRegion to "EastCan"
- set thisName to "Eastern Canada"
- else
- if inside(thisClickedLoc, rect(468, 398, 503, 428)) then
- set thisRegion to "Ottawa"
- set thisName to "Ottawa"
- else
- if inside(thisClickedLoc, rect(497, 337, 532, 367)) then
- set thisRegion to "Gaspesie"
- set thisName to "Gaspesie"
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- if stringp(thisRegion) then
- playSound(member "E_3DIMAGE" of castLib "shared")
- if not g3DIntroShown then
- set currentFrame to the frame
- disappearGizmo(gGizmo)
- play frame "3DIntro"
- go(currentFrame)
- expandGizmo(gGizmo, point(522, 121))
- else
- set g3DIntroShown to g3DIntroShown + 1
- end if
- set gCurrentLabel to thisRegion
- setLeftPanelBtn(gGizmo, 2, 1)
- set gIdleAllowed to 0
- if (g3DIntroShown = 1) and (tellLeftBtnState(gGizmo, 3) = 1) then
- setCompassPict(gGizmo, #on, member "Inf3D_stillP" of castLib "Internal")
- go(thisRegion)
- displayHelpInfo(gGizmo, "Robert Thirsk")
- updateStage()
- sound stop 2
- sound playFile 2, gExtFolderPath & "Inf3D"
- repeat while soundBusy(2)
- if the mouseDown and rollOver(47) then
- exit repeat
- end if
- end repeat
- sound stop 2
- setCompassPict(gGizmo, #on, member (gCurrentLabel & "_LenTxt") of castLib "Internal")
- else
- setCompassPict(gGizmo, #on, member (gCurrentLabel & "_LenTxt") of castLib "Internal")
- go(thisRegion)
- end if
- if not showHelpState(gGizmo) then
- openHelpDrawer(gGizmo)
- end if
- displayHelpInfo(gGizmo, thisName)
- end if
- end
-
- on handleFlies thisClickedLoc
- set thisRegion to 0
- if inside(thisClickedLoc, rect(90, 287, 139, 328)) then
- set thisRegion to "BCFLY"
- else
- if inside(thisClickedLoc, rect(410, 404, 456, 448)) then
- set thisRegion to "NIAFLY"
- else
- if inside(thisClickedLoc, rect(471, 305, 511, 358)) then
- set thisRegion to "CRAFLY"
- else
- if inside(thisClickedLoc, rect(524, 345, 567, 398)) then
- set thisRegion to "FUNDYFLY"
- else
- if inside(thisClickedLoc, rect(21, 426, 75, 471)) then
- set thisRegion to "PCI"
- end if
- end if
- end if
- end if
- end if
- if thisRegion = "PCI" then
- if stringp(thisRegion) then
- set gCurrentLabel to thisRegion
- setLeftPanelBtn(gGizmo, 2, 1)
- set gIdleAllowed to 0
- if gizmoOpened(gGizmo) then
- shrinkGizmo(gGizmo)
- setShrinkPos(gGizmo, point(597, 36))
- end if
- go(thisRegion)
- end if
- else
- if thisRegion <> " " then
- playVideo(thisRegion, #fly)
- end if
- end if
- end
-
- on handleSat thisClickedLoc
- set shouldGO to 0
- if inside(thisClickedLoc, rect(479, 428, 521, 470)) then
- set shouldGO to 1
- set gCurrentLabel to "RadarSatInfo"
- set thisSound to "InfRadar"
- else
- if inside(thisClickedLoc, rect(524, 428, 566, 470)) then
- set shouldGO to 1
- set gCurrentLabel to "LandSatInfo"
- set thisSound to "InfLand"
- else
- if inside(thisClickedLoc, rect(569, 428, 611, 470)) then
- set shouldGO to 1
- set gCurrentLabel to "SpotInfo"
- set thisSound to "InfSpot"
- end if
- end if
- end if
- if shouldGO then
- playSound(member "E_SATELLITE" of castLib "shared")
- setLeftPanelBtn(gGizmo, 2, 1)
- set gIdleAllowed to 0
- if gizmoOpened(gGizmo) then
- shrinkGizmo(gGizmo)
- setShrinkPos(gGizmo, point(597, 36))
- end if
- go(label(gCurrentLabel))
- if tellLeftBtnState(gGizmo, 3) = 1 then
- set gVoicePlaying to 1
- sound playFile 2, gExtFolderPath & thisSound
- else
- set gVoicePlaying to 0
- end if
- end if
- end
-
- on putAreaName
- case gCurrentLabel of
- "Van":
- displayHelpInfo(gGizmo, "Vancouver")
- "RidingM":
- displayHelpInfo(gGizmo, "Riding Mountain")
- "RedRiver":
- displayHelpInfo(gGizmo, "Red River")
- "Corn":
- displayHelpInfo(gGizmo, "Cornwallis")
- "RedLake":
- displayHelpInfo(gGizmo, "Red Lake")
- "LakeHur":
- displayHelpInfo(gGizmo, "Lake Huron")
- "CenOnt":
- displayHelpInfo(gGizmo, "Central Ontario")
- "Toronto":
- displayHelpInfo(gGizmo, "Toronto")
- "Montreal":
- displayHelpInfo(gGizmo, "Montreal")
- end case
- end
-
- on handleQT thisClickedLoc
- if inside(thisClickedLoc, rect(83, 428, 125, 470)) then
- playVideo("V_SteveM", #astronaut)
- else
- if inside(thisClickedLoc, rect(128, 428, 170, 470)) then
- playVideo("V_MarcG", #astronaut)
- else
- if inside(thisClickedLoc, rect(173, 428, 215, 470)) then
- playVideo("V_ChrisH", #astronaut)
- else
- if inside(thisClickedLoc, rect(218, 428, 260, 470)) then
- playVideo("V_JulieP", #astronaut)
- else
- if inside(thisClickedLoc, rect(263, 428, 305, 470)) then
- playVideo("V_BobT", #astronaut)
- else
- if inside(thisClickedLoc, rect(308, 428, 350, 470)) then
- playVideo("V_DaveW", #astronaut)
- else
- if inside(thisClickedLoc, rect(353, 428, 395, 470)) then
- playVideo("V_Bjarni", #astronaut)
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on prepare3DIntroQT
- set thisVideo to "bob_3D"
- set gIdleAllowed to 0
- stageCursorsOnOff(0)
- set videoSprite to 38
- puppetSprite(videoSprite, 1)
- set the loc of sprite videoSprite to point(320, 270)
- set the text of member "videoTextBox" of castLib "shared" to "3D Intro"
- set the fileName of member "vdLink" of castLib "shared" to gExtFolderPath & thisVideo
- set the member of sprite videoSprite to member "vdLink" of castLib "shared"
- end
-
- on playVideo thisVideo, whichType
- playSound(member "E_Astronaut" of castLib "shared")
- set gIdleAllowed to 0
- stageCursorsOnOff(0)
- disappearGizmo(gGizmo)
- if whichType = #astronaut then
- go("video")
- else
- case thisVideo of
- "BCFLY":
- go("video2")
- "NIAFLY":
- go("video4")
- "CRAFLY":
- go("video3")
- "FUNDYFLY":
- go("video1")
- end case
- end if
- set videoSprite to 38
- puppetSprite(videoSprite, 1)
- set the loc of sprite videoSprite to point(320, 270)
- set the fileName of member "vdLink" of castLib "shared" to gExtFolderPath & thisVideo
- set the member of sprite videoSprite to member "vdLink" of castLib "shared"
- case thisVideo of
- "V_MarcG":
- set the text of member "videoTextBox" of castLib "shared" to "Marc Garneau"
- "V_SteveM":
- set the text of member "videoTextBox" of castLib "shared" to "Steve MacLean"
- "V_ChrisH":
- set the text of member "videoTextBox" of castLib "shared" to "Chris Hadfield"
- "V_DaveW":
- set the text of member "videoTextBox" of castLib "shared" to "Dave Williams"
- "V_JulieP":
- set the text of member "videoTextBox" of castLib "shared" to "Julie Payette"
- "V_Bjarni":
- set the text of member "videoTextBox" of castLib "shared" to "Bjarni Tryggvason"
- "V_BobT":
- set the text of member "videoTextBox" of castLib "shared" to "Robert Thirsk"
- "BCFLY":
- set the text of member "videoTextBox" of castLib "shared" to "Coastal Mountains"
- "NIAFLY":
- set the text of member "videoTextBox" of castLib "shared" to "Niagara Escarpment"
- "CRAFLY":
- set the text of member "videoTextBox" of castLib "shared" to "Crater Lake"
- "FUNDYFLY":
- set the text of member "videoTextBox" of castLib "shared" to "Northumberland"
- end case
- end
-
- on stopVideo
- displayHelpInfo(gGizmo, " ")
- set videoSprite to 38
- set the locV of sprite videoSprite to 9999
- updateStage()
- puppetSprite(videoSprite, 0)
- go(label("CanadaMenu") + 1)
- expandGizmo(gGizmo, point(522, 121))
- set gIdleAllowed to 1
- stageCursorsOnOff(1)
- unLoad()
- end
-
- on checkDist pt1, pt2
- case gCurrentLabel of
- "Corn":
- set thisScale to 0.15069886599103
- "LakeHur":
- set thisScale to 0.59999999999999998
- "RidingM":
- set thisScale to 0.15695301872973
- "Van":
- set thisScale to 0.035442140705299
- "RedRiver":
- set thisScale to 0.026972353337829
- "RedLake":
- set thisScale to 0.0416
- "Montreal":
- set thisScale to 0.069126414931306
- "Toronto":
- set thisScale to 0.042627397791126
- "CenOnt":
- set thisScale to 0.09917527925670699
- otherwise:
- displayHelpInfo(gGizmo, "Invalid map!")
- exit
- end case
- set pixelDistSquare to (pt2 - pt1) * (pt2 - pt1)
- set pixelDist to sqrt(float(getAt(pixelDistSquare, 1) + getAt(pixelDistSquare, 2)))
- displayHelpInfo(gGizmo, string(thisScale * pixelDist) && "km")
- end
-
- on stageCursorsOnOff onOff
- if onOff then
- set fCursor to [member "fingerCursor", member "fingerCursorMask"]
- repeat with x = 2 to 6
- set the cursor of sprite x to fCursor
- end repeat
- repeat with x = 39 to 48
- set the cursor of sprite x to -1
- end repeat
- else
- repeat with x = 2 to 6
- set the cursor of sprite x to 0
- end repeat
- repeat with x = 39 to 48
- set the cursor of sprite x to 0
- end repeat
- end if
- end
-
- on showRollOverText thisSprite
- if thisSprite = #null then
- displayHelpInfo(gGizmo, " ")
- end if
- case gCurrentLabel of
- "Van":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Greater Vancouver")
- 14:
- displayHelpInfo(gGizmo, "Agricultural Areas")
- 15:
- displayHelpInfo(gGizmo, "Anchored Ships")
- 16:
- displayHelpInfo(gGizmo, "City Center")
- 17:
- displayHelpInfo(gGizmo, "Vancouver Airport")
- 18:
- displayHelpInfo(gGizmo, "Fraser River Delta")
- end case
- "RidingM":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Park Area")
- 14:
- displayHelpInfo(gGizmo, "Crop Identification")
- 15:
- displayHelpInfo(gGizmo, "Agricultural Fields")
- end case
- "RedRiver":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Red River")
- 14:
- displayHelpInfo(gGizmo, "Flood Area")
- 15:
- displayHelpInfo(gGizmo, "Morris Manitoba")
- end case
- "Corn":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Cloud Cover")
- 14:
- displayHelpInfo(gGizmo, "Sea Ice")
- 15:
- displayHelpInfo(gGizmo, "Geologic Formations")
- 16:
- displayHelpInfo(gGizmo, "Geology Type")
- 17:
- displayHelpInfo(gGizmo, "Mineral Deposits")
- end case
- "RedLake":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Lakes")
- 14:
- displayHelpInfo(gGizmo, "Forest Fire Scar")
- 15:
- displayHelpInfo(gGizmo, "Forest Cutover")
- 16:
- displayHelpInfo(gGizmo, "Regenerating Forest")
- 17:
- displayHelpInfo(gGizmo, "Cutting Activity")
- end case
- "LakeHur":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Ice Movement")
- 14:
- displayHelpInfo(gGizmo, "Ice Edges")
- 15:
- displayHelpInfo(gGizmo, "Open Water")
- 16:
- displayHelpInfo(gGizmo, "Ice Floes")
- 17:
- displayHelpInfo(gGizmo, "Sarnia, Ont.")
- end case
- "CenOnt":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Peterborough, Ont.")
- 14:
- displayHelpInfo(gGizmo, "Forest")
- 15:
- displayHelpInfo(gGizmo, "Agricultural Areas")
- 16:
- displayHelpInfo(gGizmo, "Open Pasture")
- 17:
- displayHelpInfo(gGizmo, "Lake Ontario")
- 18:
- displayHelpInfo(gGizmo, "Trent Severn")
- end case
- "Toronto":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Toronto Island")
- 14:
- displayHelpInfo(gGizmo, "Pearson Airport")
- 15:
- displayHelpInfo(gGizmo, "Highway 401")
- 16:
- displayHelpInfo(gGizmo, "Downtown Core")
- 17:
- displayHelpInfo(gGizmo, "Highway 407")
- end case
- "Montreal":
- case thisSprite of
- 13:
- displayHelpInfo(gGizmo, "Laurentians Start")
- 14:
- displayHelpInfo(gGizmo, "Agricultural Areas")
- 15:
- displayHelpInfo(gGizmo, "Canadian Space Agency")
- 16:
- displayHelpInfo(gGizmo, "Mount Royal")
- 17:
- displayHelpInfo(gGizmo, "St. Lawrence Seaway")
- end case
- end case
- end
-
- on showRollOverTextmain
- case rollOver() of
- 2:
- set thisPt to point(the mouseH, the mouseV)
- if getAt(thisPt, 1) < 378 then
- if inside(thisPt, rect(131, 361, 152, 382)) then
- displayHelpInfo(gGizmo, "RADARSAT Image")
- else
- if inside(thisPt, rect(280, 364, 301, 385)) then
- displayHelpInfo(gGizmo, "LANDSAT Image")
- else
- if inside(thisPt, rect(302, 377, 323, 398)) then
- displayHelpInfo(gGizmo, "RADARSAT Image")
- else
- if inside(thisPt, rect(303, 120, 324, 141)) then
- displayHelpInfo(gGizmo, "LANDSAT Image")
- else
- if inside(thisPt, rect(330, 365, 351, 386)) then
- displayHelpInfo(gGizmo, "LANDSAT Image")
- else
- displayHelpInfo(gGizmo, " ")
- end if
- end if
- end if
- end if
- end if
- else
- if inside(thisPt, rect(406, 427, 427, 448)) then
- displayHelpInfo(gGizmo, "RADARSAT Image")
- else
- if inside(thisPt, rect(443, 399, 464, 420)) then
- displayHelpInfo(gGizmo, "SPOT Image")
- else
- if inside(thisPt, rect(445, 421, 466, 442)) then
- displayHelpInfo(gGizmo, "SPOT Image")
- else
- if inside(thisPt, rect(483, 368, 504, 389)) then
- displayHelpInfo(gGizmo, "SPOT Image")
- else
- displayHelpInfo(gGizmo, " ")
- end if
- end if
- end if
- end if
- end if
- 3:
- displayHelpInfo(gGizmo, "3D Image")
- 4:
- displayHelpInfo(gGizmo, "Fly")
- 5:
- set thisPt to point(the mouseH, the mouseV)
- if inside(thisPt, rect(83, 428, 125, 470)) then
- displayHelpInfo(gGizmo, "Steve MacLean")
- else
- if inside(thisPt, rect(128, 428, 170, 470)) then
- displayHelpInfo(gGizmo, "Marc Garneau")
- else
- if inside(thisPt, rect(173, 428, 215, 470)) then
- displayHelpInfo(gGizmo, "Chris Hadfield")
- else
- if inside(thisPt, rect(218, 428, 260, 470)) then
- displayHelpInfo(gGizmo, "Julie Payette")
- else
- if inside(thisPt, rect(263, 428, 305, 470)) then
- displayHelpInfo(gGizmo, "Robert Thirsk")
- else
- if inside(thisPt, rect(308, 428, 350, 470)) then
- displayHelpInfo(gGizmo, "Dave Williams")
- else
- if inside(thisPt, rect(353, 428, 395, 470)) then
- displayHelpInfo(gGizmo, "Bjarni Tryggvason")
- else
- displayHelpInfo(gGizmo, " ")
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- 6:
- set thisPt to point(the mouseH, the mouseV)
- if inside(thisPt, rect(479, 428, 521, 470)) then
- displayHelpInfo(gGizmo, "RADARSAT")
- else
- if inside(thisPt, rect(524, 428, 566, 470)) then
- displayHelpInfo(gGizmo, "LANDSAT")
- else
- if inside(thisPt, rect(569, 428, 611, 470)) then
- displayHelpInfo(gGizmo, "SPOT")
- else
- displayHelpInfo(gGizmo, " ")
- end if
- end if
- end if
- end case
- end
-
- on toolActions thisTool
- case thisTool of
- "comp", "compE":
- measureDistance(gGizmo)
- "mag":
- updatemagnifier()
- otherwise:
- dontPassEvent()
- end case
- end
-
- on startMagnify
- set magScale to 2
- set magSize to 120
- if gIsMac then
- openXLib("Magnifier XObject")
- set gZoomObj to Magnifier(mnew, "Allen Hempfield", "EA1467842391")
- gZoomObj(mSetCircleShape)
- gZoomObj(mSetHeightWidth, magSize, magSize)
- gZoomObj(mSetMagnification, magScale)
- else
- openXLib("c:\zoom\zoom")
- set gZoomObj to Zoom(mnew, the stageRight - magSize, the stageBottom - magSize, magSize, magSize, 16, 0)
- gZoomObj(mShape, 1)
- gZoomObj(mScale, magScale)
- end if
- end
-
- on stopMagnify
- if gIsMac then
- gZoomObj(mdispose)
- set gZoomObj to 0
- closeXLib("Magnifier XObject")
- else
- gZoomObj(mdispose)
- set gZoomObj to 0
- closeXLib("c:\zoom\zoom")
- end if
- end
-
- on updatemagnifier
- if gIsMac then
- cursor(200)
- gZoomObj(mFloatNew, the mouseH, the mouseV)
- repeat while the stillDown
- gZoomObj(mFloatRun, the mouseH, the mouseV)
- end repeat
- gZoomObj(mFloatDone)
- cursor([member "magCursor" of castLib "Gizmo", member "magCursorMask" of castLib "Gizmo"])
- else
- gZoomObj(mStart)
- end if
- end
-
- on turnLegend onOff
- if onOff = #on then
- puppetSprite(gLegendSprite, 1)
- set the loc of sprite gLegendSprite to point(640, 480)
- else
- puppetSprite(gLegendSprite, 0)
- end if
- updateStage()
- end
-